<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition template="template-with-sidebar.xhtml" xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                xmlns:odr="http://java.sun.com/jsf/composite/odr">

    <ui:define name="head">
        <script type="text/javascript" src="resources/js/vtip-min.js"></script>
        <script type="text/javascript" src="resources/js/jquery-ui-1.8.6.custom.min.js"></script>

        <link rel="stylesheet" type="text/css" href="resources/css/vtip.min.css" />
        <link rel="stylesheet" type="text/css" href="resources/css/jquery-ui-1.8.6.custom.css" />
    </ui:define>

    <ui:define name="pagetitle">
        <ice:outputText value="#{form['decision.wizard.page.title']}" nospan="true"/>
    </ui:define>


    <ui:define name="content">
        <div>
            <ice:form id="manageDecisionForm"
                      partialSubmit="true"
                      rendered="#{manageDecisionController.valid}"
                      styleClass="wizardForm">

                <odr:breadcrumb breadCrumbSource="#{manageDecisionController.navigationBar}" />


                <h1>
                    <ice:outputFormat value="#{manageDecisionController.headline}">
                        <f:param value="#{manageDecisionController.currentStep.stepName}" />
                    </ice:outputFormat>
                </h1>

                <ui:include src="#{manageDecisionController.currentStep.faceletName}" />

                <ice:commandButton action="#{manageDecisionController.backToProject}"
                                   value="#{form['button.cancel']}"
                                   styleClass="abort"
                                   immediate="true"/>

                <ice:commandButton actionListener="#{manageDecisionController.resetForm}"
                                   value="#{form['button.reset']}"
                                   styleClass="abort"
                                   style="margin-left: 10px"
                                   immediate="true"/>

                <ice:commandButton action="#{manageDecisionController.previousStep}"
                                   rendered="#{!manageDecisionController.firstStep}"
                                   value="#{form['button.previous']}"
                                   id="previousStepButton"
                                   partialSubmit="false"
                                   styleClass="previousStepButton"/>

                <ice:commandButton action="#{manageDecisionController.nextStep}"
                                   rendered="#{!manageDecisionController.lastStep}"
                                   value="#{form['button.next']}"
                                   id="nextStepButton"
                                   partialSubmit="false"
                                   styleClass="nextStepButton"/>

                <ice:commandButton action="#{manageDecisionController.submitForm}"
                                   rendered="#{manageDecisionController.lastStep}"
                                   value="#{form['button.submit']}"
                                   styleClass="confirm"
                                   partialSubmit="false"
                                   id="manageDecisionSubmitButton"/>

                <ice:commandButton action="#{manageDecisionController.submitForm}"
                                   rendered="#{!manageDecisionController.lastStep}"
                                   value="#{form['button.to.last']}"
                                   id="toLastStepButtonTop"
                                   partialSubmit="false"
                                   styleClass="toLastStepButton"/>
            </ice:form>
        </div>
    </ui:define>

    <ui:define name="sidebar">
        <ui:include src="#{manageDecisionController.currentStep.sidebarFaceletName}" />
    </ui:define>
</ui:composition>